package com.example.eventbus.send;

import io.vertx.core.AbstractVerticle;
import io.vertx.core.eventbus.EventBus;
import io.vertx.core.json.JsonObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ProducerVerticle extends AbstractVerticle {

    private static final Logger LOGGER = LoggerFactory.getLogger(ProducerVerticle.class);

    @Override
    public void start() throws Exception {
        EventBus eventBus = vertx.eventBus();
        for (int i = 0; i < 100; i++) {
            eventBus.send("eventbus",new JsonObject().put("value","hello event bus "+i));
        }
    }
}
